package simulationSupport;

public class WaterTempSpot {
	
	private int x;
	private int y;
	private double radius;
	private double variation;
	
	//Generators
	
	private ParamRandom varRand;
	
	public WaterTempSpot(int x, int y,double rad,double var)
	{
		this.x = x;
		this.y = y;
		this.radius = rad;
		this.variation = var;
	}
	public WaterTempSpot(int maxX,int maxY)
	{
		x = (int)(Math.random()*maxX);
		y = (int)(Math.random()*maxY);
		radius =  Math.random()*25;
		double[] p1 = {0.02,0.03,0.05,0.1,0.25,0.25,0.1,0.05,0.03,0.02};
		varRand = new ParamRandom(-4, 1.0, p1);
		variation = varRand.getRandomedTarget();
	}
	
	public boolean isInsideRadius(int fx,int fy)
	{
		double dist = Math.sqrt(Math.pow(fx, 2) + Math.pow(fy, 2));
		if(dist > this.radius)
			return false;
		return true;
	}
	public double getVariation()
	{
		return this.variation;
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	
	

}
